package com.person.leetcode.editor.cn;

import java.util.List;

/**
  * 139.单词拆分
  * 2022-09-15 17:53:51
**/
public class Sequence_0139_WordBreak {
    public static void main(String[] args) {
        Solution solution = new Sequence_0139_WordBreak().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public boolean wordBreak(String s, List<String> wordDict) {
        for (String word : wordDict) {
            if(word.contains(s)){
                word = word.replaceAll(s,"");
            }
        }
        return "".equals(s);
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}